load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test")

rust_binary(
    name = "certificate-issuer",
    srcs = glob(["src/**/*.rs"]),
    proc_macro_deps = [
        # Keep sorted.
        "@crate_index//:async-trait",
    ],
    version = "0.1.0",
    visibility = ["//rs:release-pkg"],
    deps = [
        # Keep sorted.
        "//rs/boundary_node/certificate_issuance/certificate_orchestrator_interface",
        "@crate_index//:anyhow",
        "@crate_index//:axum",
        "@crate_index//:candid",
        "@crate_index//:chacha20poly1305",
        "@crate_index//:clap",
        "@crate_index//:cloudflare",
        "@crate_index//:flate2",
        "@crate_index//:futures",
        "@crate_index//:http",
        "@crate_index//:ic-agent",
        "@crate_index//:ic-http-certification",
        "@crate_index//:ic-response-verification",
        "@crate_index//:ic-utils",
        "@crate_index//:idna",
        "@crate_index//:instant-acme",
        "@crate_index//:leb128",
        "@crate_index//:mockall",
        "@crate_index//:pem",
        "@crate_index//:prometheus",
        "@crate_index//:rcgen",
        "@crate_index//:reqwest",
        "@crate_index//:serde",
        "@crate_index//:serde_cbor",
        "@crate_index//:serde_json",
        "@crate_index//:sha2",
        "@crate_index//:thiserror",
        "@crate_index//:tokio",
        "@crate_index//:tower",
        "@crate_index//:tracing",
        "@crate_index//:tracing-subscriber",
        "@crate_index//:trust-dns-resolver",
        "@crate_index//:zeroize",
    ],
)

rust_test(
    name = "certificate_issuer_test",
    crate = ":certificate-issuer",
    proc_macro_deps = [
        # Keep sorted.
        "@crate_index//:async-trait",
    ],
    deps = [
        # Keep sorted.
        "//rs/boundary_node/certificate_issuance/certificate_orchestrator_interface",
        "@crate_index//:anyhow",
        "@crate_index//:axum",
        "@crate_index//:candid",
        "@crate_index//:chacha20poly1305",
        "@crate_index//:clap",
        "@crate_index//:cloudflare",
        "@crate_index//:flate2",
        "@crate_index//:futures",
        "@crate_index//:http",
        "@crate_index//:ic-agent",
        "@crate_index//:ic-http-certification",
        "@crate_index//:ic-response-verification",
        "@crate_index//:ic-utils",
        "@crate_index//:idna",
        "@crate_index//:instant-acme",
        "@crate_index//:leb128",
        "@crate_index//:mockall",
        "@crate_index//:pem",
        "@crate_index//:prometheus",
        "@crate_index//:rcgen",
        "@crate_index//:reqwest",
        "@crate_index//:serde",
        "@crate_index//:serde_cbor",
        "@crate_index//:serde_json",
        "@crate_index//:sha2",
        "@crate_index//:thiserror",
        "@crate_index//:tokio",
        "@crate_index//:tower",
        "@crate_index//:tracing",
        "@crate_index//:tracing-subscriber",
        "@crate_index//:trust-dns-resolver",
        "@crate_index//:zeroize",
    ],
)
